<template>
	<view>
		<view class="flex-padd" style="margin-top: 30rpx;">
			<u-steps :list="numList" mode="number" :current="0"></u-steps>
			<view style="padding:30rpx;display: flex;flex-direction: column;align-items: center;">
				<u-upload ref="uUpload" :action="action" :auto-upload="true" max-count="1" :show-progress="true"></u-upload>
				<view style="color: #007AFF;" @click="submit">上传头像</view>
			</view>
			<!-- 列表 -->
			<u-cell-group>
				<u-cell-item title="姓名" :arrow="false" value="">
					<input value="张诗" />
				</u-cell-item>
				<u-cell-item title="手机号" :arrow="false" value="">
					<input value="15126593658" />
				</u-cell-item>
				<u-cell-item title="证件名称" value="">
					<input value="" />
				</u-cell-item>
				<u-cell-item title="出生日期" value="">
					<input value="1993.10.23" />
				</u-cell-item>
				<u-cell-item title="性别" value="">
					<input value="女" />
				</u-cell-item>
				<u-cell-item title="籍贯" value="">
					<input value="湖南 长沙" />
				</u-cell-item>
				<u-cell-item title="户口所在地" value="">
					<input value="广州 深圳" />
				</u-cell-item>
				<u-cell-item title="最高学历" value="">
					<input value="本科" />
				</u-cell-item>
			</u-cell-group>
		</view>

		<!-- 按钮 -->
		<view class="button-con">
			<view class="button-return" @click="add">
				<view class="button">下一步</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				numList: [{
					name: '基本信息'
				}, {
					name: '入职信息'
				}, {
					name: '主要经历'
				}, {
					name: '证件上传'
				}],
				action: '',
				filesArr: []
			}
		},
		methods: {
			submit() {
				let files = [];
				// 通过filter，筛选出上传进度为100的文件(因为某些上传失败的文件，进度值不为100，这个是可选的操作)
				files = this.$refs.uUpload.lists.filter(val => {
					return val.progress == 100;
				})
				// 如果您不需要进行太多的处理，直接如下即可
				// files = this.$refs.uUpload.lists;
				console.log(files)
			}
		}
	}
</script>

<style lang="scss" scoped>
	.a {
		text-align: center;
	}
</style>
